//
//  NTNetWorkManager.swift
//  NTNetWorkManager
//
//  Created by zto_yhd on 2020/1/14.
//  Copyright © 2020 zto_yhd. All rights reserved.
//

import Alamofire


open class NTNetWorkManager {
    
    var manager: SessionManager!

    public static let shared: NTNetWorkManager = {
        let share = NTNetWorkManager()
        return share
    }()
    
    
    fileprivate init() {
        let configuration = URLSessionConfiguration.default
        configuration.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders
        configuration.timeoutIntervalForRequest = 10
        manager = SessionManager(configuration: configuration)
        manager.delegate.sessionDidReceiveChallenge = { session,challenge in
            return (URLSession.AuthChallengeDisposition.useCredential, URLCredential(trust: challenge.protectionSpace.serverTrust!))
        }
    }
    
    open func requestTest() {
        print("哈哈哈哈")
    }
    
}
